/*遍历图片*/
let content=document.getElementsByClassName("content")[0];
$.ajax({
    url:'http://localhost:8080/final_kele_war_exploded/photo/listPhoto',    //请求的url地址
    dataType:"json",
    type:"get",
    success:function(data){
        for(let i=0;i<data.length;i++){
            content.innerHTML+="<div class='imgContent'>" +
                "<img class='Img' src='../waterfallImg/"+data[i]+"'>" +
                "</div>"
        }
    },
});
/*点击全屏显示*/
let Img=document.getElementsByClassName("Img");
let screenImg=document.getElementsByClassName("screenImg")[0];
$.ajax({
    url:'http://localhost:8080/final_kele_war_exploded/photo/listPhoto',//请求的url地址
    dataType:"json",
    type:"get",
    success:function(data){
        for(let i=0;i<Img.length;i++){
            Img[i].onclick=function(){
                screenImg.style.display="block";
                screenImg.style.backgroundImage="url(../waterfallImg/"+data[i]+")";
            }
        }
    },
});
screenImg.onclick=function(){
    screenImg.style.display="none";
    screenImg.style.backgroundImage="";
}
/*加载动画*/
let loadAnimation=document.getElementsByClassName("loadAnimation")[0];
let timer=setTimeout(function(){
    content.style.display="block";
    loadAnimation.style.display="none";
},4000);
// clearTimeout(timer);